package com.leo.ibatis.demo.domain;

import java.io.Serializable;

public class Profile implements Serializable {

	private static final long serialVersionUID = 1L;

	private String userid;

	private String langpref;

	private String favcategory;

	private int mylistopt;

	private int banneropt;

	public Profile() {
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getLangpref() {
		return langpref;
	}

	public void setLangpref(String langpref) {
		this.langpref = langpref;
	}

	public String getFavcategory() {
		return favcategory;
	}

	public void setFavcategory(String favcategory) {
		this.favcategory = favcategory;
	}

	public int getMylistopt() {
		return mylistopt;
	}

	public void setMylistopt(int mylistopt) {
		this.mylistopt = mylistopt;
	}

	public int getBanneropt() {
		return banneropt;
	}

	public void setBanneropt(int banneropt) {
		this.banneropt = banneropt;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((userid == null) ? 0 : userid.hashCode());

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final Profile other = (Profile) obj;
		if (userid == null) {
			if (other.userid != null)
				return false;
		} else if (!userid.equals(other.userid))
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"userid=" + "'" + userid + "'" + 
			")";
	}
	
}
